#ifndef FOODORDERITEM_H
#define FOODORDERITEM_H

#include <QWidget>
#include <QListWidget>
#include "Food.h"

namespace Ui {
class FoodOrderItem;
}

class FoodOrderItem : public QListWidget
{
    Q_OBJECT

public:
    explicit FoodOrderItem(QListWidget *parent = nullptr);
    ~FoodOrderItem();
    void init(QString name,int price);  //初始化item

signals:
    void addIntoShopCart(Food food); //添加进购物车中

private slots:
    Food on_buy_btn_clicked();  //购买按钮点击事件

private:
    Ui::FoodOrderItem *ui;
};

#endif // FOODORDERITEM_H
